import Login from '../pages/Login';
import Index from '../pages/admin/dashboard/index';
import Edit from '../pages/admin/products/Edit';
import List from '../pages/admin/products/List';
import PageNotFound from '../pages/pageNotFound';
import Notices from '../pages/admin/notices/notices';
//这里写入全局需要的路由
export const mainRoutes = [{
        //登录页面
        path: '/login',
        component: Login
    },
    {
        //404找不到页面
        path: '/404',
        component: PageNotFound
    }
]


//admin用户页面的路由
export const adminRoutes = [{
        //看板
        path: '/admin/dashboard',
        component: Index,
        //是否展示
        isShow: true,
        exact: true,
        title: '看板'

    },
    {
        //通知界面中心的展示
        path: '/admin/notices',
        component: Notices,
        exact: true,
        title: '通知界面中心'

    },
    {
        //展示
        path: '/admin/products',
        component: List,
        isShow: true,
        title: '商品管理',
        //精确匹配
        exact: true,
    },
    {
        path: '/admin/products/edit/:id?',
        component: Edit
    }
]